package com.atguigu.cloud.controller;

import com.atguigu.cloud.apis.AlibabaPayFeignApi;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author bairimengchang
 * @version 1.0
 * @project cloud2024
 * @description 通过feign接口来访问9001/9002微服务
 * @date 2024/11/1
 */
@RestController
public class AlibabaPayFeignController {

    @Resource
    private AlibabaPayFeignApi alibabaPayFeignApi;

    @GetMapping("/feign/pay/get/info")
    public String getInfo(){
        // 通过feign调用9001/9002微服务（feign默认支持负载均衡）
        return alibabaPayFeignApi.getInfoByConsul();
    }

}
